package org.come.baitan;

import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.MutableTreeNode;
import java.util.ArrayList;
import java.util.List;

/**
 * @author 式
 * @version 1.0
 * @project test1
 * @description 收购列表
 * @date 2024/1/29 23:55:11
 */
public class AccessBaiTanMsgUntil {
	public static int exvalue;
	static String[] t={"我的收购","召唤兽","打造","灵宝","其他"};
	static String[] t2={"龙之骨","龙之骨","龙之骨","龙之骨","龙之骨","龙之骨"};
	public static void showSuitMethod(final DefaultMutableTreeNode top, final boolean bool){
		top.removeAllChildren();
		for (int i=0;i<=t.length-1;i++){
			boolean bool2 = true;
			final DefaultMutableTreeNode node = new DefaultMutableTreeNode(t[i]);
			List<String> partlist= new ArrayList<>();
			if (i==0){
				partlist.add("我的收购");
			}else if (i==1){
				partlist.add("培养物品");
			}else if (i==2){
				partlist.add("矿石");

			}else if (i==3){
				partlist.add("培养物品(灵宝)");
			}else if (i==4){
				partlist.add("材料");
				partlist.add("坐骑");
				partlist.add("技能书");
			}
			if (partlist != null && partlist.size() > 0){
				int j = 0;
				while (j < partlist.size()) {
					node.add(new DefaultMutableTreeNode(partlist.get(j)));
					++j;
				}
			}
			top.add((MutableTreeNode)node);
		}
	}
}
